var app = require('express').createServer();
var io = require('socket.io').listen(app);

app.listen(8080);

io.sockets.on('connection', function (socket) {
	socket.on('broadcast', function(err, data) {
		console.log(data);
		io.sockets.emit('chat', 'hello');
	});
});